package com.skillworld.webapp.model.tutorial;

import java.sql.Date;

import javax.persistence.Column;
import javax.persistence.Entity;

import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table(name="TutorialRanking")
public class TutorialRanking
{
	private Long idRankingTU;
	private Date date; 
	private Tutorial tutorial1;
	private Tutorial tutorial2;
	private Tutorial tutorial3; 
	private Tutorial tutorial4;
	private Tutorial tutorial5;
	//
	
	public TutorialRanking() {
	}

	@SequenceGenerator(name = "TutorialRankingIdGenerator", sequenceName = "TutorialRankingSeq")
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "TutorialRankingIdGenerator")
	@Column(name = "idRankingTU")
	public long getIdRankingTU() {
		return idRankingTU;
	}

	public void setIdRankingTU(long idRankingTU) {
		this.idRankingTU = idRankingTU;
	}

	@Column(name = "date")
	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	@Column(name = "idTutorial1")
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "idTutorial")
	public Tutorial getTutorial1() {
		return tutorial1;
	}

	public void setTutorial1(Tutorial tutorial1) {
		this.tutorial1 = tutorial1;
	}

	@Column(name = "idTutorial2")
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "idTutorial")
	public Tutorial getTutorial2() {
		return tutorial2;
	}

	public void setIdTutorial2(Tutorial tutorial2) {
		this.tutorial2 = tutorial2;
	}

	@Column(name = "idTutorial3")
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "idTutorial")
	public Tutorial tutorial3() {
		return tutorial3;
	}

	public void setTutorial3(Tutorial tutorial3) {
		this.tutorial3 = tutorial3;
	}

	@Column(name = "idTutorial4")
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "idTutorial")
	public Tutorial getTutorial4() {
		return tutorial4;
	}

	public void setTutorial4(Tutorial tutorial4) {
		this.tutorial4 = tutorial4;
	}

	@Column(name = "idTutorial5")
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "idTutorial")
	public Tutorial getTutorial5() {
		return tutorial5;
	}

	public void setTutorial5(Tutorial tutorial5) {
		this.tutorial5 = tutorial5;
	}

	
	
	
	

}
